﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<InvoiceInvoker.MvcUI.Models.InvoiceModel>" %>
<%@ Import Namespace="InvoiceInvoker.Logic" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Szczegóły faktury - InvoiceInvoker
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h3>Szczegóły faktury nr <%: Model.Number %></h3>
    
	<%: Html.DisplayForModel(new { VatRates = ViewData["VatRates"], NetValues = ViewData["NetValues"], VatValues = ViewData["VatValues"], GrossValues = ViewData["GrossValues"] })%>
    
    <p>
		<%: Html.ActionLink("PDF - Oryginał", "ToPdf", new { id = Model.Id, invoiceType = PdfCreator.InvoiceType.Original }) %> |
		<%: Html.ActionLink("PDF - Kopia", "ToPdf", new { id = Model.Id, invoiceType = PdfCreator.InvoiceType.Copy }) %> |
		<% if (Model.Status == Invoice.InvoiceStatus.Created.ToString()) {%>
		<%: Html.ActionLink("Zapłacona", "MarkAsPaid", new { id = Model.Id }) %> |
		<% } %>
        <%: Html.ActionLink("Usuń", "Delete", new { id = Model.Id }) %> |
        <%: Html.ActionLink("Powrót do historii faktur", "Index") %>
    </p>

</asp:Content>

